<template>
  <div class="page">
    <div class="operat">
      归属记录（共{{count||0}}条）
    </div>
    <zm-table-data :data="tableParams.data" :columns="columns" :fetch="loadList" :table-params="tableParams"></zm-table-data>
  </div>
</template>

<script>
import tableMixin from '@/mixins/zmTableMixin'
import { belongColumns } from './const'
import {getPageList} from '@/api/src/customerTransfer'

export default {
  name: 'SaleInfo',
  components: {

  },
  mixins: [tableMixin],
  props: {
    id: {
      type: String,
      default: ''
    },
    obj: {
      type: Object,
      default: {}
    }
  },
  data () {
    return {
      count: ''
    }
  },
  computed: {
    columns () {
      return belongColumns(this)
    }
  },
  created () {
  },
  methods: {
    async loadList () {
      const res = await getPageList(this.assignQuery({ customerId: this.id }))
      this.count = res.count
      this.initialTableData(res.list, res.count)
    }
  }
}
</script>

<style scoped lang="scss">
.operat {
  height: 40px;
  line-height: 40px;
  margin-bottom: 10px;
}
</style>
